<template>
	<view class="common-text">
		<text class="text">
			{{ props.text }}
		</text>
		<view class="right">
			<view v-if="props.isCalendar">
				<uni-icons type="calendar" size="30rpx"></uni-icons>
				<uni-dateformat :date="new Date()" format="d日"></uni-dateformat>
			</view>
			<view v-else>
				<navigator url="/pages/classify/classify" open-type="reLaunch" class="nav-bar">More+</navigator>
			</view>
		</view>
	</view>
</template>

<script setup>
	const props = defineProps(['text', 'isCalendar'])
</script>

<style lang="scss" scoped>
	.common-text {
		display: flex;
		justify-content: space-between;
		padding: 0 30rpx;

		.text {
			font-size: 30rpx;
		}

		.right {
			:deep() {

				.uni-icons {
					color: $brand-theme-color !important;
				}
			}

			.nav-bar {
				color: #ddd !important;
				font-size: 32rpx;
			}
		}
	}
</style>